package service.mock;

import common.consts.Accounts;
import domain.Account;
import org.springframework.stereotype.Service;
import service.AccountService;
import service.ServiceResponse;
import utils.Ids;

/**
 * Created by aceyin on 2015/5/31 0031.
 */
@Service("accountServiceMock")
public class AccountServiceMock implements AccountService {
    @Override
    public ServiceResponse login(String username, String password, String ip) {
        Account account = new Account();
        account.setId(Ids.get(username));
        account.setUsername(username);
        account.setPassword(password);
        account.setStatus(Accounts.Status.NORMAL.name());
        return ServiceResponse.success().with("account", account);
    }

    @Override
    public ServiceResponse register(Account account) {
        return null;
    }

    @Override
    public ServiceResponse resetPassword(String mobile, String password) {
        return null;
    }
}
